<table class="formTable">
<tbody>
{if $forms.id != ''}
	<tr>
		<th>登録日時</th>
		<td>{$forms.r_date}<input type="hidden" name="forms[r_date]" value="{$forms.r_date}" /></td>
	</tr>
	<tr>
		<th>更新日時</th>
		<td>{$forms.u_date}<input type="hidden" name="forms[u_date]" value="{$forms.u_date}" /></td>
	</tr>
	<tr>
		<th>ID</th>
		<td>{'%06d'|sprintf:$forms.id}</td>
	</tr>
{/if}
<tr>
    <th class="must">状態</th>
    <td>{html_radios name='forms[status]' options=$news->getStatusMap() selected=$forms.status separator='　'}</td>
</tr>
<tr>
    <th class="must">日付</th>
    <td>
		{assign var=key value='date'}
		<input type="text" name="forms[{$key}]" id="text_{$key}" class="text_date" value="{$forms[$key]}" />
		{if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
<tr>
    <th class="must">タイトル</th>
    <td>
    	{assign var=key value='title'}
    	<textarea name="forms[{$key}]" cols="80">{$forms[$key]}</textarea>
    	{if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
<tr>
    <th>サブタイトル</th>
    <td>
    	{assign var=key value='sub_title'}
    	<textarea name="forms[{$key}]" cols="80">{$forms[$key]}</textarea>
    	{if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
<tr>
    <th>キーワード</th>
    <td>
		{assign var=key value='keyword'}
		<input type="text" name="forms[{$key}]" id="text_{$key}" class="text" value="{$forms[$key]}" />
		{if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
	</td>
</tr>
<tr>
    <th>サムネイル画像</th>
    <td>
        {if isset($forms.file1)}
			{image_uploader name='forms[file1][]' value=$forms.file1}
        {else}
			{image_uploader name='forms[file1][]'}
        {/if}
    </td>
</tr>
<tr>
    <th>公開開始日時</th>
    <td class="floats">
        <input type="text" name="forms[st_date]" class="text_date" value="{$forms.st_date}" />
        {html_options name='forms[st_time]' options=$news->getTimeMap() selected=$forms.st_time}<span>時</span>
    </td>
</tr>
<tr>
    <th>公開終了日時</th>
    <td class="floats">
        <input type="text" name="forms[ed_date]" class="text_date" value="{$forms.ed_date}" />
        {html_options name='forms[ed_time]' options=$news->getTimeMap() selected=$forms.ed_time}<span>時</span>
    </td>
</tr>
{if isset($use_category)}
<tr>
    <th>カテゴリ</th>
    <td>
    	{category_selecter selected_category=$forms.select_category parent=$use_category}
    </td>
</tr>
{/if}
<tr>
    <th class="must">種別</th>
    <td>
    	{html_radios name='forms[type]' options=$news->getTypeMap() selected=$forms.type separator='&nbsp;'}
    </td>
</tr>
</tbody>
</table>

<div id="rowLink">
	<h4><span>&nbsp;</span>外部リンク</h4>
	<table class="formTable">
    <tbody>
        <tr>
            <th>リンク先</th>
            <td>
				{assign var=key value='url'}
				<input type="text" name="forms[{$key}]" id="text_{$key}" class="text" value="{$forms[$key]}" />
				{html_radios name='url_target' options=$target selected=$forms.url_target separator='&nbsp;'}
				{if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
            </td>
        </tr>
    </tbody>
	</table>
</div>

<div id="rowFile">
	<h4><span>&nbsp;</span>ファイル</h4>
	<table class="formTable">
	<tbody>
		<tr>
			<th>ファイル指定</th>
			<td>
				{file_uploader name='forms[file2][]'}
			    {if isset($forms.file2_saved)}
			    	<p>登録済ファイル：　{', '|implode:$forms.file2_saved}</p>
			    {/if}
			</td>
		</tr>
	</tbody>
	</table>
</div>

<div id="rowPage">
	<h4><span>&nbsp;</span>ページ</h4>
	<table class="formTable">
    <tbody>
        <tr>
            <th>ページ内容</th>
            <td>
            	{assign var=key value='page_text'}
				<textarea name="forms[{$key}]" cols="80" class="mce_edit">{$forms[$key]}</textarea>
				{if isset($err[$key])}{$validate->getMessages($err[$key]) nofilter}{/if}
            </td>
        </tr>
    </tbody>
	</table>
</div>